package com.ruoyi.event.domain.bo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 请假业务对象 event_leave
 *
 * @author strongme
 * @date 2023-02-04
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class EventLeaveBo extends BaseEntity {

    /**
     * id
     */
    @NotNull(message = "id不能为空", groups = {EditGroup.class})
    private Long leaveId;

    /**
     * 吸毒人员id
     */
    @NotNull(message = "吸毒人员id不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long userId;

    /**
     * 外出地
     */
    @NotBlank(message = "外出地不能为空", groups = {AddGroup.class, EditGroup.class})
    private String wcd;

    /**
     * 本人联系电话
     */
    @NotBlank(message = "本人联系电话不能为空", groups = {AddGroup.class, EditGroup.class})
    private String brlxdh;

    /**
     * 家人联系电话
     */
    @NotBlank(message = "家人联系电话不能为空", groups = {AddGroup.class, EditGroup.class})
    private String jrlxdh;

    /**
     * 起始日期
     */
    @NotNull(message = "起始日期不能为空", groups = {AddGroup.class, EditGroup.class})
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date qsrq;

    /**
     * 结束日期
     */
    @NotNull(message = "结束日期不能为空", groups = {AddGroup.class, EditGroup.class})
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date jsrq;

    /**
     * 担保人
     */
    @NotBlank(message = "担保人不能为空", groups = {AddGroup.class, EditGroup.class})
    private String dbr;

    /**
     * 担保人电话
     */
    @NotBlank(message = "担保人电话不能为空", groups = {AddGroup.class, EditGroup.class})
    private String dbrdh;

    /**
     * 请假事由
     */
    @NotBlank(message = "请假事由不能为空", groups = {AddGroup.class, EditGroup.class})
    private String qjsy;

    /**
     * 图片
     */
    private String img;

    /**
     * 备注
     */
    private String remark;

    /**
     * 审核状态
     */
    @NotBlank(message = "审核状态不能为空", groups = {AddGroup.class, EditGroup.class})
    private String status;

    /**
     * 审批人
     */
    private Long spr;

    /**
     * 审批单位
     */
    private String spdw;


}
